var timer=null;
function displayClock(num){
    if(num<10){
        return "0"+num;
    }
    else{
        return num;
    }
}
function stopClock(){
    clearTimeout(timer);
}
function startClock(){
    var time =new Date();
    var years=time.getFullYear()+"-";
    var months=displayClock(time.getMonth()+1)+"-";
    var days=displayClock(time.getDate())+"  ";
    var hours=displayClock(time.getHours())+":";
    var minutes=displayClock(time.getMinutes())+":";
    var seconds=displayClock(time.getSeconds());
    show.innerHTML=years+months+days+hours+minutes+seconds;
    timer=setTimeout("startClock()",1000);
}